function resizeGridItem(e){grid=jQuery(e).closest(".loop-grid")[0],"undefined"!=typeof grid&&(rowHeight=parseInt(window.getComputedStyle(grid).getPropertyValue("grid-auto-rows")),rowGap=parseInt(window.getComputedStyle(grid).getPropertyValue("grid-row-gap")),rowSpan=Math.ceil((e.querySelector(".grid-item-cont").getBoundingClientRect().height+rowGap)/(rowHeight+rowGap)),e.style.gridRowEnd="span "+rowSpan)}function resizeAllGridItems(){for(allItems=document.getElementsByClassName("grid-item"),x=0;x